package com.dgshanger.sanhxiaofeisc.entity

import android.app.Activity
import com.dgshanger.sanhxiaofeisc.App.Companion.application
import com.dgshanger.sanhxiaofeisc.R
import com.dgshanger.sanhxiaofeisc.ui.person.*
import com.dgshanger.sanhxiaofeisc.ui.person.feedback.FeedbackActivity
import com.dgshanger.sanhxiaofeisc.ui.person.purse.PurseActivity
import com.dgshanger.sanhxiaofeisc.ui.person.setting.SettingActivity
import java.util.*

/**
 * PersonalItemEntity
 * 沉迷学习不能自拔
 * Describe：
 * Created by 雷小星🍀 on 2018/4/12 16:27.
 */

class PersonalItemEntity(var iconRes: Int, var title: String?, private var aClass: Class<out Activity>?) {

    fun getaClass(): Class<out Activity>? {
        return aClass
    }

    fun setaClass(aClass: Class<out Activity>) {
        this.aClass = aClass
    }

    companion object {

        val list: List<PersonalItemEntity>
            get() = ArrayList<PersonalItemEntity>()
                    .apply {
                        add(PersonalItemEntity(R.drawable.qianbao_, application.getString(R.string.Wallet), PurseActivity::class.java))
                        add(PersonalItemEntity(R.drawable.shezhi_, application.getString(R.string.setting), SettingActivity::class.java))
                        add(PersonalItemEntity(R.drawable.fapiao_, application.getString(R.string.invoice_assistant), InvoiceAssistantActivity::class.java))
                        add(PersonalItemEntity(R.drawable.fenxiang_,  application.getString(R.string.shared), SharedActivity::class.java))
                        add(PersonalItemEntity(R.drawable.tuandui_, application.getString(R.string.my_team), MyTeamActivity::class.java))
                        add(PersonalItemEntity(R.drawable.paihang_, application.getString(R.string.Member_Promotion_leaderboard), PromoteRankingActivity::class.java))
                        add(PersonalItemEntity(R.drawable.kefu_,  application.getString(R.string.contact_the_customer_service), ServiceActivity::class.java))
                        add(PersonalItemEntity(R.drawable.yijian_, application.getString(R.string.feedback), FeedbackActivity::class.java))
                        add(PersonalItemEntity(R.drawable.tuichu_, application.getString(R.string.log_out), null))
                    }

    }
}
